﻿/// Copyright © 2013 Microsoft Corporation. 
/// This project is released under the Microsoft Public License (MS-PL)
///
namespace DataMorph.Processing
{
    using System;

    public class ProgressNotifier : IProgressNotifier
    {
        private readonly IProgressQueue progressQueue;

        public ProgressNotifier(IProgressQueue progressQueue)
        {
            this.progressQueue = progressQueue;
        }

        public void NotifyFileProcessed(string fileId, string storageAccountName, string dataSetName, double processingTimeInSeconds)
        {
            this.progressQueue.AddProgressReport(new FileProcessedMessage(fileId, processingTimeInSeconds)
                                                {
                                                    StorageAccount = storageAccountName,
                                                    DataSetName = dataSetName
                                                });
        }
    }
}